package util.triemap;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.util.AbstractMap;
import java.util.AbstractMap.SimpleEntry;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import util.TrieSet;

public class TrieSetTest {
    
    private TrieSet<Object> s;
    
    @Before
    public void setUp() throws Exception
    {
        s = new TrieSet<Object>();
    }
    
    @After
    public void tearDown() throws Exception
    {
    }
    
    @Test
    public void testTrieSet()
    {
        assertNotNull(s);
    }
    
    @Test
    public void testSizeOnCreationIs0()
    {
        assertEquals(0, s.size());
    }
    
    @Test
    public void testIsEmptyOnCreation()
    {
        assertTrue(s.isEmpty());
    }
    
    @Test
    public void testContains()
    {
        fail("Not yet implemented"); // TODO
    }
    
    @Test
    public void testIterator()
    {
        fail("Not yet implemented"); // TODO
    }
    
    @Test
    public void testToArray()
    {
        fail("Not yet implemented"); // TODO
    }
    
    @Test
    public void testToArrayTArray()
    {
        fail("Not yet implemented"); // TODO
    }
    
    @Test
    public void testAdd()
    {
        assertTrue(s.add(new AbstractMap.SimpleEntry<String, Object>("a", new Object())));
    }
    
    @Test
    public void testPut()
    {
        assertNull(s.put("a", new Object()));
    }
    
    @Test
    public void testRemove()
    {
        SimpleEntry<String, Object> entry = new AbstractMap.SimpleEntry<String, Object>("a",
                new Object());
        s.add(entry);
        assertTrue(s.remove(entry));
    }
    
    @Test
    public void testContainsAll()
    {
        fail("Not yet implemented"); // TODO
    }
    
    @Test
    public void testAddAll()
    {
        fail("Not yet implemented"); // TODO
    }
    
    @Test
    public void testRetainAll()
    {
        fail("Not yet implemented"); // TODO
    }
    
    @Test
    public void testRemoveAll()
    {
        fail("Not yet implemented"); // TODO
    }
    
    @Test
    public void testClear()
    {
        fail("Not yet implemented"); // TODO
    }
    
    @Test
    public void testGetRoot()
    {
        fail("Not yet implemented"); // TODO
    }
    
    @Test
    public void testRemoveEntry()
    {
        fail("Not yet implemented"); // TODO
    }
    
}
